<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {:widget_st('layui','css')}
  {:widget_st('admin','css')}
  {:widget_st('jq','js')}
  {:widget_st('laydate','js')}    
  {:widget_st('webuploader')}
  {:widget_st('layui','js')}  
  {:widget_st('common','js')} 
</head>
{:do_action('admin_head')}
<body> 
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <?php $form_widget = new \app\common\widget\FormPro();  ?>
      <form class="info_tj" method="post"  >
        <input type="hidden" name="cid" value="{$cid|default=''}">
        <div class="layui-col-sm12">
          <div class="layui-row layui-col-space15">
              <div class="layui-col-sm9">
                <div class="layui-card">
                  <div style="padding-top: 20px;"></div>
                  {$form_widget->form_textarea(['title'=>'标题(,隔开)','name'=>'titles','data'=>'','theme'=>1])|raw}
                </div>
              </div>
              <div class="layui-col-sm3">
                
                {include file="public/widget_submit"}
                
              </div>
          </div>
        </div>
      </form>
        
      </div>
    </div>
  </div>
  

  <script>
 layui.use(['form','upload','laydate'], function(){
    var $ = layui.$
    ,admin = layui.admin
    ,element = layui.element
    ,form = layui.form
    ,laydate = layui.laydate
    ,upload = layui.upload;


    
    
      $(".tijiao").on("click",function(){
        var index = layer.load(2);
        var data = $(".info_tj input,.info_tj textarea,.info_tj select").serialize();      
        $.ajax({
            type:'post',
            url:"{:url('admin/category/post_add_pl')}",
            data:data,
            dataType:'json',
            success:function(res){
              layer.close(index);
              if(res.result==1){
                layer.msg(res.msg, {icon: 1});
                setTimeout(function() {
                  window.parent.location.reload();
                }, 2000);
              }else{
                layer.msg(res.msg, {icon: 2});
                
              }
              
            }
        })
      });
    


  

  });

  function deleteFile(obj) {
   $(obj).parent().remove();
  }
</script>
</body>
</html>
{:do_action('admin_js')}